package tpf.designer.pattern.course5.structure_pattern2.homework;

import org.junit.Test;

public class Client {
    @Test
    public void test1(){
        BinaryDigitsCalculator calculator = (BinaryDigitsCalculator) Memoizer.memoize(new PiBinaryDigitsCalculator());
        System.out.println(calculator.calculateBinaryDigit(12));
    }

    @Test
    public void test2(){
        BinaryDigitsCalculator calculator = new CachingBinaryDigitsCalculator(new PiBinaryDigitsCalculator());
        System.out.println(calculator.calculateBinaryDigit(13));
    }
}
